<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../node_modules/jquery/dist/jquery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: #ccc;
        }

        .top {
            padding-left: 30px;
            height: 100px;
            background-color: #3d3d3d;
            color: #fff;
            line-height: 100px;
            border-radius: 0 0 12px 12px;
        }

        .main {
            position: relative;
            margin: 20px auto;
        }

        .main span {
            display: block;
            width: 70px;
            height: 30px;
            position: absolute;
            left: 100px;
            top: 14px;
            color: #ccc;
            background-color: #fff;
        }

        .csv,
        .json {
            padding-top: 20px;
            padding-left: 32px;
            height: 230px;
            width: 90%;
            margin: 20px auto;
            font-size: 20px;
            display: block;
            border-radius: 20px;
            border: 1px solid #ccc;
            outline: none;
        }

        .main .convert {
            transition: all .3s;
            position: absolute;
            right: 116px;
            padding: 0 20px;
            height: 50px;
            color: #fff;
            font-size: 20px;
            background-color: #83d0ff;
            border: none;
        }

        .main .convert:hover {
            background-color: #00aeec;
        }

        .main .csv_btn {
            position: absolute;
            right: 142px;
            top: 184px;
        }

        .main .json_btn {
            position: absolute;
            right: 142px;
            top: 434px;
        }

        .main .csv_btn button,
        .json_btn button {
            height: 27px;
            padding: 0 20px;
            border: none;
            line-height: 27px;
            color: #fff;
            font-size: 16px;
            background-color: #83d0ff;
            border-radius: 5px;
        }

        .main .csv_btn button:hover,
        .json_btn button:hover {
            background-color: #00aeec;
        }
    </style>
</head>

<body>
    <div class="top">
        <h2>CSV2JSON</h2>
    </div>
    <div class="main">
        <textarea name="" id="" class="csv" spellcheck="false" placeholder="CSV">
        </textarea>
        <div class="csv_btn">
            <button class="upload">上传csv文件</button>
            <button class="download">下载csv文件</button>
        </div>
        <textarea name="" id="" class="json" spellcheck="false" placeholder="JSON" readonly>
        </textarea>
        <div class="json_btn">
            <button class="upload">上传json文件</button>
            <button class="download">下载json文件</button>
        </div>
        <button class="convert">Convert to JSON</button>
    </div>
    <script src="./convert.js"></script>
</body>

</html>